package com.yanyeori.webtest.config;

import com.yanyeori.framework.core.util.RSAUtil;
import com.yanyeori.framework.security.service.UsernamePasswordDecrypt;

import javax.servlet.http.HttpServletRequest;

/**
 * @author chenkuan
 * @since 2022/8/5 005 10:40
 */
public class WebUsernamePasswordDecrypt extends UsernamePasswordDecrypt {

    private static final String PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCVhGcFvn5iQonkI4dactT93oYUh09GCCGytQ8xK/13XV7kMb5nESWFs7j8FDzI9NW/NqNvxoKkd0K2XDxez3/DBLq4g48M0Ar+Pod2lBBFfUTBWBtD3eEKniXMEttyQuhN5KnHA4QdMFXoRAEZk8aXovaltWo6t4j2XYxSgFKNO2211ZPaYkYw/GKMhDfitCXWxZt9g5TOrWbW/51eQY/s9VEOSYvXjzlnLEk28ULivOArYMUmQfs4jCkBxJDInBU+SWqfpQkaF5e0NRxqRbf/oEnRYUZWarbrjUi5OjRbUYL648sclkUdcVZMY60m38jaOIK1deoJ1U38Ytbgm+klAgMBAAECggEBAIQ/MxyKjKD+t5Z5smvXK/tMio23zO9lm+DEcyaMAUpF5Puz3/Sr3uNuvs0AXW9l13Wkr1TbYYx1DCXeWWuG3zuwgDNZ8fpkPYT567l/ZxD/pwPYmW0i4L0Set4RQ9bBxVW4Tk8AFif3K9Uf6VUlNz/CXaTeXJKI6fT3c3k5lUrjDp+9G+9K+SmfvRc6buv7vTCGVO4zVPLM8KdFZyylZ/GkL0rDYhkL92slLfpQt3K64VoJYAdnsHmXOJ8KEYDbq6NhqPkQIRezRwHNe5kI0CslsDg5+F8Fymo/pmjYrQoHLABqZvUcy+M3e00+LmMbyDSPQ4HrgPsCKN/Uh9LmNkECgYEAxXO7zNt9WguEYMpgf3nW/oQ4GnpqlXMjb+0HJNh0nJEWoWumvdjvJahsaoIPIh+BlnghEr65kSd4B+tgYT2Oqykuxb9cmMGxN9/dbhLS1xhqFRddTZlbQ8ndzlKCfyCmAYN1g0E81ad2qqb4yOEeAhfNwPsSXQzWACZxPwyOzTECgYEAwdoCcWkKYSme274xhmpKtmn+AL86CQP0iozUmF0viIBw04tk9ZbeSr/tDpqIVjGLiCSIXe4oB2sfwIT1mDgB5h05btbjl4FlE8WAZcior5dDlNJHIdYxXXKFb7htfzAqwu5mXXIlLD6foog5P+e3ItnlfXE91f8Sg/dnfylOzjUCgYAEpt1dzi392RedUCdF2ZD/Hg5UUV4Bd1z2Xhc0/wSAS8rEssyS3HGF6ZnkSHwiyas76EifMG8exFdHmHwEznZ2AdpgPknoL2gFcPi+hyMAfkrBhHNmSJ6l0jOvkLISXKqMjpROK1NLlU5uZtClqugSFI18Zm3gU1UXW9B/M8SJgQKBgAbLVlSVQuje5ZN8Gg5FAXNdSarLCQSx38tPXlAsy/Kz1cCEXTiCXi4uheeCIQ8sU2ClLyZjp4GDDqzXvCfmpqJjGdU5sOZpgZpszLBElSz6V0MLD7Uu5bIJxoWA6E2R6Z3Fb08NJiJj24J91cvYmkGdc36vDmTGuOZpMHZzgzCVAoGAJMO/rVpfQIudlMMl/hoHA2ArFzKVdRgxDyE5AeiA9AaUt3s9LG4LOFlzCVGh8nP3d/kyA4j8EBkOibyDF+Ufom65hDik3uWQzJWtMNMOiaXLztu7mY/mWrR30ZQS5CpxT4X0bpVsHy17ZGXPzUxq8MrEBNi6pb22gfziWb5eruo=";

    @Override
    public String password(HttpServletRequest request, String password) {
        return RSAUtil.decrypt(PRIVATE_KEY, password);
    }
}
